home *** CD-ROM | disk | FTP | other *** search
- -- card: 8941 from stack: in
- -- bmap block id: 8995
- -- flags: 4000
- -- background id: 7184
- -- name: A,a,b known
- ----- HyperTalk script -----
- on mouseUp
- set numberFormat to <0.000000>
-
- --Calculate Sin A
- get sin(card field "angle A"*(pi/180))
- put it into mem1
- put it into card field "sin A"
-
- --Calculate Sin B
- get card field "side b"*mem1/card field "side a"
- put it into mem2
- put it into card field "sin B"
-
- --Calculate Angle B
- get atan(mem2/sqrt(-mem2*mem2+1))*(180/pi)
- put it into card field "angle B"
-
- --Calculate Angle C
- get 180-(card field "angle A"+card field "angle B")
- put it into mem3
- put it into card field "angle C"
-
- --Calculate Sin C
- get sin(card field "angle C"*(pi/180))
- put it into card field "sin C"
-
- --Calculate Side C
- get (card field "side b"*card field "sin C")/card field "sin B"
- put it into card field "side c"
-
- --Calculate Area
- get (card field "side a"+card field "side b"+card field "side c")/2
- put it into mem9
- get sqrt(mem9*(mem9-card field "side a")*(mem9-card field "side b") *(mem9-card field "side c"))
- put it into bkgnd field "Area"
-
- --Calculate Perimeter
- get card field "side a"+card field "side b"+card field "side c"
- put it into bkgnd field "Perimeter"
- end mouseUp
-
-
- -- part 1 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=305 top=146 right=163 bottom=433
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: side a
-
-
- -- part 2 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=112 top=263 right=280 bottom=240
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: side b
-
-
- -- part 3 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=22 top=217 right=234 bottom=150
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: angle A
-
-
- -- part 4 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=245 top=82 right=101 bottom=373
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: angle B
-
-
- -- part 5 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=299 top=215 right=234 bottom=427
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: angle C
-
-
- -- part 6 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=51 top=135 right=154 bottom=184
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: side c
-
-
- -- part 7 (field)
- -- low flags: 01
- -- high flags: 0001
- -- rect: left=422 top=50 right=62 bottom=482
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: sin A
-
-
- -- part 8 (field)
- -- low flags: 01
- -- high flags: 0001
- -- rect: left=422 top=63 right=75 bottom=482
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: sin B
-
-
- -- part 9 (field)
- -- low flags: 01
- -- high flags: 0001
- -- rect: left=422 top=76 right=88 bottom=482
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: sin C
-
-
- -- part contents for card part 1
- ----- text -----
- 2
-
- -- part contents for card part 2
- ----- text -----
- 3
-
- -- part contents for card part 3
- ----- text -----
- 28.955024
-
- -- part contents for card part 7
- ----- text -----
- 0.484123
-
- -- part contents for card part 8
- ----- text -----
- 0.726184
-
- -- part contents for card part 4
- ----- text -----
- 46.567463
-
- -- part contents for card part 5
- ----- text -----
- 104.477513
-
- -- part contents for card part 9
- ----- text -----
- 0.968246
-
- -- part contents for card part 6
- ----- text -----
- 4.000003
-
- -- part contents for background part 3
- ----- text -----
- 9.000003
-
- -- part contents for background part 5
- ----- text -----
- 2.904736